import request from '@/utils/request'

// 查询PS订单列表
export function listPsorders(query) {
    return request({
        url: '/dashboard/psorders/list',
        method: 'get',
        params: query
    })
}

// 查询PS订单详细
export function getPsorders(id) {
    return request({
        url: '/dashboard/psorders/' + id,
        method: 'get'
    })
}

// 新增PS订单
export function addPsorders(data) {
    return request({
        url: '/dashboard/psorders',
        method: 'post',
        data: data
    })
}

// 修改PS订单
export function updatePsorders(data) {
    return request({
        url: '/dashboard/psorders',
        method: 'put',
        data: data
    })
}

// 删除PS订单
export function delPsorders(id) {
    return request({
        url: '/dashboard/psorders/' + id,
        method: 'delete'
    })
}

// 提现申请
export function saveGradWithdrawal(data) { // 接收一个 data 对象
    return request({
        url: '/dashboard/psorders/saveGradWithdrawal',
        method: 'post',
        data: data // 直接发送 data 对象作为请求体
    })
}
